import request from '@/utils/request'

// 查询贷款及分期历史列表
export function listInstallmentHistory(query) {
  return request({
    url: '/invest/installmentHistory/list',
    method: 'get',
    params: query
  })
}

// 查询贷款及分期历史详细
export function getInstallmentHistory(id) {
  return request({
    url: '/invest/installmentHistory/' + id,
    method: 'get'
  })
}

// 新增贷款及分期历史
export function addInstallmentHistory(data) {
  return request({
    url: '/invest/installmentHistory',
    method: 'post',
    data
  })
}

// 修改贷款及分期历史
export function updateInstallmentHistory(data) {
  return request({
    url: '/invest/installmentHistory',
    method: 'put',
    data
  })
}

// 删除贷款及分期历史
export function delInstallmentHistory(id) {
  return request({
    url: '/invest/installmentHistory/' + id,
    method: 'delete'
  })
}
